package game.logic;
import game.objects.GOPlayer;
import game.objects.GORect;
import game.objects.GameObject;
import game.objects.interfaces.Ownable;
import graphics.objects.GRect;
import graphics.system.Color;

import java.io.Serializable;

import tools.Point;
import tools.id.IdObject;
public class Player implements IdObject, Serializable {
	private int id;
	private GOPlayer figure;
	public Player(int playerId) {
		id = playerId;
	}
	@Override
	public int getId() {
		return id;
	}
	@Override
	public void setId(int id) {
		this.id = id;
	}
	@Override
	public void setIndexInList(int i) {
	}
	@Override
	public String toString() {
		return "player " + id;
	}
	public boolean hasFigure() {
		return figure != null;
	}
	public void setFigure(GOPlayer gameObject) {
		figure = gameObject;
		figure.setOwner(this.getId());
	}
	public Point getFigurePos() {
		// TODO
		return figure.figure.head.pos;
	}
	public Point getCameraPos() {
		return figure.getCameraPosition();
	}
}
